

<div class="bombBox" id="revisePwdBomb" style="top:111px;left: -4px" >
    <div class="bombContent revisePwdBomb whiteBg" style="min-width:400px;">

        <div class="ftc pd10">
            <div class="input-group listSeaForm wb100">
				<span class="input-group-btn">
					<span class="btn">原始密码：</span>
				</span>
                <input class="form-control" type="password" id="old-password" value="" placeholder="输入旧密码">
            </div>
            <div class="input-group listSeaForm wb100 mt10">
				<span class="input-group-btn">
					<span class="btn">新密码：</span>
				</span>
                <input class="form-control" type="password" value="" id="new-password" placeholder="输入新密码，6~8个字符，可使用字母、数字">
            </div>
            <div class="input-group listSeaForm wb100 mt10">
				<span class="input-group-btn">
					<span class="btn">确认新密码：</span>
				</span>
                <input class="form-control" type="password" value="" id="re-new-password" placeholder="确认新密码">
            </div>
            <a class="btn btn-primary determine wb100 mt20 saveRevisePwd">保存</a>
        </div>
    </div>

</div>
<!-- 修改密码弹框 end -->
<script>
    $(function () {
        $(".saveRevisePwd").click(function () {
            var old_password = $.trim($("#old-password").val());
            var new_password = $.trim($("#new-password").val());
            var re_new_password = $.trim($("#re-new-password").val());
            if(old_password==''){
                remindBox('原密码不能为空');
                $('#old-password').focus();
                return false;
            }
            if(new_password==''){
                remindBox('请输入新密码');
                $('#new-password').focus();
                return false;
            }
            if(re_new_password==''){
                remindBox('请重复输入新密码');
                $('#re-new-password').focus();
                return false;
            }
            if(re_new_password!==new_password){
                remindBox('两次输入的密码不一致');
                return false;
            }
            if(new_password==old_password){
                remindBox('旧密码不能和新密码一致');
                return false;
            }
            if(!is_password(new_password)){
                remindBox('输入的新密码需要6~8个字符并且不能是特殊字符');
                return false;
            }

            $.post('{:U("Index/editPassword")}',{old_password:old_password,new_password:new_password},function (data) {
                if(data.status=='success'){
                    remindBox('修改成功');
                    parent.layer.closeAll();
                }else{
                    remindBox(data.msg);
                }

            })


        })
    })
</script>